package inter; // Arquivo Node.java
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import lexer.Lexer;

public class Node {
	int lexline = 0;
	Node() { lexline = Lexer.line; }
	void error(String s) { throw new Error("near line "+lexline+": "+s); }
	static int labels = 0;
	public int newlabel() { return ++labels; }
	public void emitlabel(int i) { System.out.print("L" + i + ":"); }
	public void emit(String s)   {
		try{
		File arquivo = new File("temp");
		FileWriter output = new FileWriter(arquivo);
		System.out.println("\t" + s);
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}